import { type SVGProps } from 'react';

interface Props extends SVGProps<SVGSVGElement> {
  name: string
  size?: number | string
}

const SvgIcon = ({ name, size = 24, ...props }: Props) => {
  return (
    <svg
      width={size}
      height={size}
      fill="currentColor"
      {...props}
    >
      <use href={`#icon-${name}`} />
    </svg>
  );
};

export default SvgIcon;